//
//  MXLockViewController.h
//  MXLoginMethodsDomo
//
//  Created by 马彦 on 16/9/27.
//  Copyright © 2016年 MX. All rights reserved.
//
/**
 *
 *      密码解锁控制器
 *
 */

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, MXLockType)
{
    MXLockTypeCreate = 0,
    MXLockTypeModify,
    MXLockTypeVerify,
    MXLockTypeRemove
};

typedef NS_ENUM(NSInteger, MXLockAppearMode)
{
    MXLockAppearModePush = 0,
    MXLockAppearModePresent
};

@protocol MXLockViewControlerDelegate <NSObject>

@optional
- (void)passwordDidCreate:(NSString *)newPassword;
- (void)passwordDidModify:(NSString *)newPassword;
- (void)passwordDidVerify:(NSString *)oldPassword;
- (void)passwordDidRemove;

@end

@interface MXLockViewController : UIViewController

@property (nonatomic, weak) id<MXLockViewControlerDelegate> delegate;
@property (nonatomic, assign) MXLockType type;
@property (nonatomic, assign) MXLockAppearMode appearMode;

- (instancetype)initWithType:(MXLockType)type appearMode:(MXLockAppearMode)appearMode;

@end
